﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using SwenAssignment3.Classes;

namespace SwenAssignment3
{
    public partial class ModulesPage : System.Web.UI.MasterPage
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!Page.IsPostBack)
            {
                lblUsername.Text = (string)Session["username"];
                string access = DRHotelDBManager.retrieveAccessRightsByUsername(lblUsername.Text);
                lblPrivilege.Text = access;
                if(access == "Receptionist")
                {
                    additionalReport.Visible = false;
                    AccordionPane2.Visible = false;
                    AccordionPane4.Visible = false;
                }
                else if(access == "Management Executive")
                {
                    AccordionPane4.Visible = false;
                }
                else
                {
                    
                }
            }
        }
    }
}